﻿Imports YvanSoftware.Orb
Module Module1

    Sub Main()
        Dim strAPiKey, user, pass As String
        Console.WriteLine("Please enter API key: ")

        strAPiKey = Console.ReadLine()
        Console.WriteLine("Enter username:")
        user = Console.ReadLine
        Console.WriteLine("Enter password:")
        pass = Console.ReadLine

        Dim oAuth As New Authentication(strAPiKey)
        Console.Write("Performing auth: ")
        If oAuth.performLogin(user, pass) Then
            Console.WriteLine("[OK]")
            Console.WriteLine("SessionID=" & oAuth.sessionID)
        Else
            Console.WriteLine("[Failed!]")
        End If
        Dim oComputer As New OrbComputer(oAuth.sessionID)
        Console.WriteLine("RAM Usage: " & oComputer.getStatus("RAMUsage") & "/" & oComputer.getStatus("totalRAM"))
        Console.WriteLine("Free space: " & oComputer.getStatus("freeSpace"))
        Console.WriteLine("IP: " & oComputer.getStatus("homeIP") & "(" & oComputer.getStatus("homeLocation") & ")")
        Console.ReadKey()
    End Sub

End Module
